{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,validator.js"}

<div class="main-div">
  <form action="ceping.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate();">
    <table cellspacing="1" cellpadding="3" width="100%">
      <tr>
        <td class="label">标题:</td>
        <td><input type="text" name="title" size="40" value="{$exam.title}"/>
        {$lang.require_field}</td>
      </tr>
      <tr>
        <td class="label">简述:</td>
        <td><textarea type="text" name="content" cols="40" rows="20">{$exam.content}</textarea></td>
      </tr>
      <tr>
        <td class="label">上传图标:</td>
        <td>
          <input type="file" name="icon" size="35" />
          {if $exam.icon}
            <a href="goods.php?act=show_image&img_url={$exam.icon}" title="点击查看图片" target="_blank"><img src="images/yes.gif" border="0" /></a>
          {else}
            <img src="images/no.gif" />
          {/if}
          <span class="notice-span" style="display:block">100px * 100px</span>
        </td>
      </tr>
      <tr>
      	<td class="label">排序：</td>
      	<td><input type="text" name="ordering" size="40" value="{$exam.ordering}"/></td>
      </tr>
      <tr align="center">
        <td colspan="2">
          <input type="hidden" name="id" value="{$exam.exam_id}" />
          <input type="submit" value="{$lang.button_submit}" class="button" />
          <input type="hidden" name="act" value="{$act}" />
        </td>
      </tr>
    </table>
  </form>
</div>

<script type="text/javascript">


{literal}

onload = function() {
	  document.forms['theForm'].elements['group_name'].focus();
	  startCheckOrder();
	}

	function validate()
	{
	  var validator = new Validator('theForm');
	  validator.required('title', '标题不能为空');

	  return validator.passed();
	}

{/literal}  

</script>
{include file="pagefooter.htm"}